home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / tweak16b.zip / TWEAK.DOC < prev    next >
Text File  |  1993-11-29  |  43KB  |  1,055 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                 TWEAK 1.6ß - Mold your own VGA modes
  8.  
  9.          by Robert Schmidt of Ztiff Zox Softwear, 1992-93
  10.  
  11.  
  12.           This program and the accompanying source files
  13.               are hereby donated to the public domain.
  14.                   (for whatever that's worth...)
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. (Sorry for not page-formatting this doc.  The headers can be found by
  23. doing a text search with your favourite editor.)
  24.  
  25.  
  26. Contents:
  27.  
  28. WHAT IS TWEAK, ANYWAY?
  29. SUGGESTION BOX
  30. DISCLAIMER
  31. A QUICK PRIMER
  32. WHAT HAS TWEAK GOT TO DO WITH THIS?
  33. A COUPLE OF RULES
  34. A TUTORIAL
  35. EDITOR REFERENCE
  36. FREQUENTLY ASKED QUESTIONS
  37. THE TWEAK FILES
  38. USING TWEAK MODES ON YOUR OWN
  39. THE INCLUDED FILES
  40. THE 'MISC' DIRECTORY
  41. CREDITS
  42. BIBLIOGRAPHY
  43. HOW TO REACH ME
  44.  
  45.  
  46.  
  47.  
  48.                         WHAT IS TWEAK, ANYWAY?
  49.  
  50.  
  51. TWEAK is an utility to ease the work of twiddling with the registers on
  52. a standard VGA compatible video card to produce and explore new, previously
  53. undocumented screen modes with weird resolutions.  You will want to
  54. purchase a technical VGA reference to get the full potential out of
  55. TWEAK, but I included some files to get you started (see the section
  56. on the 'MISC' directory).
  57.  
  58. TWEAK.EXE is the main executable.  This version is not compatible with 
  59. any versions prior to 1.0, so if you want to use files created by 
  60. version 0.9x, convert them with 09TO10.EXE.  
  61.  
  62. Stop press!  In the subdirectory XINTRO is an article which serves as
  63. an introduction to programming in Mode X (320x240 with 256 colors).
  64. Make sure you read this if you're new to tweaking and Mode X!
  65.  
  66. MODES.DOC describes some of the more exciting 256x256, 400x300 
  67. and 400x600 256-color modes!
  68.  
  69.  
  70.  
  71.  
  72.                         SUGGESTION BOX
  73.  
  74.  
  75. All suggestions to enhance or modify TWEAK are welcome, especially bug
  76. reports/fixes.  So are donations, for that matter.  See e-mail and
  77. snail-mail addresses at the end of this file.
  78.  
  79. Please send me any changes you make to enhance TWEAK or to make it
  80. compatible with other compilers or video cards, and I will start
  81. including conditional sections for each supported compiler.
  82. Do *not* re-release the changed source without my permission.
  83. Well, how can I stop ya...?
  84.  
  85. Any suggestions and contributions will be credited in subsequent
  86. versions, although I can't guarantee that your ideas will actually be
  87. used.
  88.  
  89.  
  90.  
  91.  
  92.  
  93.                           DISCLAIMER
  94.  
  95.  
  96. I don't think this is neccessary in PD stuff, but everybody else does
  97. it:
  98.  
  99. The author author of this archive has used his best efforts in 
  100. preparing it.  However, the author makes no warranty of any kind, 
  101. expressed or implied, with regard to the programs, data or 
  102. documentation included with the archive.  The author shall not be 
  103. liable in any event for incidental or consequential damages in 
  104. connection with, or arising out of, the furnishing, performance, 
  105. quality, or use of the programs, data or documentation included in this 
  106. archive.
  107.  
  108. Phew.
  109.  
  110. Some time ago, putting illegal or unsupported values or combinations
  111. of such into the video card registers might prove hazardous to both
  112. your monitor and your health.  I have *never* claimed that bad things
  113. can't happen if you use TWEAK, although I'm pretty sure it never will.
  114. I've never heard of any damage arising from trying out TWEAK, or from
  115. general VGA tweaking in any case.  I did receive a mail from a person
  116. whose monitor failed producing the correct colors, after using mode
  117. X.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.                            A QUICK PRIMER
  125.  
  126.  
  127. You never heard about neither documented nor undocumented modes, you 
  128. say?  Well, to begin with:  Your VGA card has a number of registers 
  129. that control the way the card works.  That is, how it is going to 
  130. translate the data that programs put into the video memory, to the 
  131. signals that produce text and/or graphics on your monitor.
  132.  
  133. The standard interface to a video card on all IBM compatible PCs is the 
  134. BIOS, which consists of several device independant routines for setting 
  135. screen modes, moving the cursor, writing text, scrolling blocks of text 
  136. etc.  The BIOS also takes care of setting the appropriate registers at 
  137. appropriate times, for example when changing screen modes.  That way, 
  138. programmers have a consistent interface to the VGA, and usually won't 
  139. need to tamper with the registers directly.
  140.  
  141. A screen mode specifies the resolution of the image you see on the 
  142. screen, i.e. the number of pixels (dots) horizontally and vertically, 
  143. the number of colors, and wether the screen should be capable of 
  144. showing just text, or if graphics are allowed.  These things are 
  145. controlled by the VGA registers, and the BIOS contains a number of 
  146. predefined tables of register values for the standard VGA modes we've 
  147. all come to love and honour.  Mode number 3, for example, is the 80 
  148. characters times 25 lines (80x25) text screen that most people use 
  149. daily.  Mode number 19 (or 13h in hexadecimal) is the 256-color 320x200 
  150. mode used in most popular games supporting the VGA.
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.                 WHAT HAS TWEAK GOT TO DO WITH THIS?
  158.  
  159.  
  160. Well, some people, me included, are of the 'power-hungry' breed.  We want
  161. to exploit the full potential of everything we get between our hands.
  162. We think that the one 320x200 256-color mode supported by all standard VGA
  163. BIOS'es is for wimps.  Some guy came up with the idea of modifying the
  164. register configuration, to achieve greater resolution and a different
  165. video memory layout.
  166.  
  167. TWEAK grants you direct access to all the most significant registers
  168. that control such things as resolution and colors.  You may have thought
  169. that your VGA was limited to 320x200 when it was displaying 256 colors?
  170. Well, all VGAs are able to support no less than 400x600 in 256 colors.
  171. (The problem is with the monitors, which might not be sophisticated
  172. enough to support the relatively much higher clock frequency needed to
  173. output that many pixels.  My monitor flickers and rolls occasionaly.)
  174.  
  175. Most newer VGA cards' BIOSes add several enhanced modes not supported
  176. by the standard VGA defined by IBM, for example text modes with 132
  177. characters on each line, or graphics resolutions of 800x600, 1280x1024
  178. and more.  Such cards are usually referred to as Super VGAs.  To make it
  179. possible to produce such resolutions, video card developers has had to
  180. add new registers to the set of registers defined by the VGA.  TWEAK is
  181. generally not able to support such extended registers, meaning that you
  182. will not be able to tweak a Super VGA any more than is possible on a
  183. standard VGA.  Extensions that are provided by utilizing undefined bits
  184. in the standard VGA registers are supported however.  The included
  185. Chips & Technologies specific 132x*.twk files are examples of such.
  186.  
  187. The main reason for not including Super VGA (SVGA) support is that
  188. there are so many different SVGA standards.  Nearly every developer has
  189. their own standard.  Also, I can see no real reason for wanting to tweak
  190. any SVGAs, as the resolution dimensions they offer usually are far
  191. superior to the VGA's resolutions.  With tweaked VGA modes there's
  192. a much higher propability that they will work on most VGAs and SVGA,
  193. than tweaked SVGA modes.
  194.  
  195. If this is the first you have read about VGA registers and the BIOS,
  196. TWEAK.EXE and this documentation alone is not enough to get you going.
  197. You will need, and probably want, a somewhat technical reference to the
  198. VGA, which explains all standard VGA registers and the meaning of every
  199. contained bit.  Although TWEAK doesn't support it, you'll probably want
  200. a reference which also contains some discussion on Super VGAs, just for
  201. your convenience when you want to program serious applications etc.  If
  202. you're of the adventurous breed, check out the VGA.TXT and VGABIOS.TXT
  203. files included in the .\MISC directory.
  204.  
  205. You see, tweaking the VGA is not as simple as putting the horizontal
  206. resolution in one register, the vertical in another and the number of
  207. colours in yet another.  Several registers has to be set to cooperating
  208. values that work together to acheive what you want.  Single bits has to
  209. be toggled into the correct states